package com.ice.common;

import java.io.Serializable;
import java.sql.Date;
import java.text.SimpleDateFormat;

/**
 * 日志规范
 * @author gangchaopan
 *
 */
public class LogBean implements Serializable{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	

	
	// 当前时间
	private long startTime;
	// 结束时间
	private long endTime;
	// 记录的信息
	private String message;
	// 记录错误信息
	private String exception;
	// 运行的时间
	private long runTime;
	
	
	public String getTime(){
		SimpleDateFormat format = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
		Date date = new Date(startTime);
		return format.format(date);
	}
	
	public long getRunTime(){
		return runTime=(endTime - startTime);
	}
	
	public long getStartTime() {
		return startTime;
	}
	public void setStartTime(long startTime) {
		this.startTime = startTime;
	}
	public long getEndTime() {
		return endTime;
	}
	public void setEndTime(long endTime) {
		this.endTime = endTime;
	}
	public String getMessage() {
		return message;
	}
	public void setMessage(String message) {
		this.message = message;
	}
	public String getException() {
		return exception;
	}
	public void setException(String exception) {
		this.exception = exception;
	}
	

	
	
	
}
